package com.antilia.infomaresme.form;

import org.apache.wicket.Component;
import org.odlabs.wiquery.core.javascript.JsStatement;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;

/**
 * @author Ernesto Reinaldo Barreiro
 *
 */
public class TemporaryTooltipBehavior extends TooltipBehavior {

	private static final long serialVersionUID = 1L;

	/**
	 * Constructor.
	 */
	public TemporaryTooltipBehavior() {
	}
	
	@Override
	public JsStatement statement() {
		String id= "#"+getComponent().getMarkupId()+"_trigger";
		return new JsStatement().$(null, id).chain("tooltip", 
				getOptions().getJavaScriptOptions());
	}
	
	public boolean isTemporary(Component component)
	{
		return true;
	}

}
